package com.assets.room.entity;

import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.room.PrimaryKey;

import java.io.Serializable;

@Entity(tableName = "asset_check_data")
public class CheckData implements Serializable {

    private static final long serialVersionUID=1L;

    /**
     * 盘点数据id
     */
    @ColumnInfo(name = "check_data_id")
    @PrimaryKey(autoGenerate = true)
    private Long checkDataId;

    /**
     * 盘点单号
     */
    @ColumnInfo(name = "check_id")
    private Long checkId;

    /**
     * 盘点标识
     */
    @ColumnInfo(name = "check_flag")
    private Long checkFlag;

    /**
     * 资产编号
     */
    @ColumnInfo(name = "asset_number")
    private String assetNumber;

    /**
     * 资产名称
     */
    @ColumnInfo(name = "asset_name")
    private String assetName;

    /**
     * 型号
     */
    @ColumnInfo(name = "model")
    private String model;

    /**
     * 类别
     */
    @ColumnInfo(name = "type")
    private String type;

    /**
     * 盘点结果（0：正常，1：盘盈，2：盘亏 , 3:未盘)
     */
    @ColumnInfo(name = "check_result")
    private String checkResult;

    /**
     * 存放地点
     */
    @ColumnInfo(name = "place")
    private String place;


    @ColumnInfo(name = "is_flag")
    private String isFlag;

    @Ignore
    public CheckData() {
    }

    public CheckData(Long checkDataId, Long checkId, Long checkFlag,
                     String assetNumber, String assetName, String model,
                     String type, String checkResult, String place,
                     String isFlag) {
        this.checkDataId = checkDataId;
        this.checkId = checkId;
        this.checkFlag = checkFlag;
        this.assetNumber = assetNumber;
        this.assetName = assetName;
        this.model = model;
        this.type = type;
        this.checkResult = checkResult;
        this.place = place;
        this.isFlag = isFlag;
    }

    public Long getCheckDataId() {
        return checkDataId;
    }

    public void setCheckDataId(Long checkDataId) {
        this.checkDataId = checkDataId;
    }

    public Long getCheckId() {
        return checkId;
    }

    public void setCheckId(Long checkId) {
        this.checkId = checkId;
    }

    public Long getCheckFlag() {
        return checkFlag;
    }

    public void setCheckFlag(Long checkFlag) {
        this.checkFlag = checkFlag;
    }

    public String getAssetNumber() {
        return assetNumber;
    }

    public void setAssetNumber(String assetNumber) {
        this.assetNumber = assetNumber;
    }

    public String getAssetName() {
        return assetName;
    }

    public void setAssetName(String assetName) {
        this.assetName = assetName;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getCheckResult() {
        return checkResult;
    }

    public void setCheckResult(String checkResult) {
        this.checkResult = checkResult;
    }

    public String getPlace() {
        return place;
    }

    public void setPlace(String place) {
        this.place = place;
    }

    public String isFlag() {
        return isFlag;
    }

    public void setFlag(String flag) {
        isFlag = flag;
    }

    @Override
    public String toString() {
        return "CheckData{" +
                "checkDataId=" + checkDataId +
                ", checkId=" + checkId +
                ", checkFlag=" + checkFlag +
                ", assetNumber='" + assetNumber + '\'' +
                ", assetName='" + assetName + '\'' +
                ", model='" + model + '\'' +
                ", type='" + type + '\'' +
                ", checkResult='" + checkResult + '\'' +
                ", place='" + place + '\'' +
                ", isFlag=" + isFlag +
                '}';
    }
}